﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Abp.AutoMapper;
using Microsoft.AspNetCore.Mvc;
using Yozeev.BusinessLogic.DomainService;
using Yozeev.BusinessLogic.Dtos;

namespace Yozeev.Controllers.TicketAccount
{
    [Route("api/TicketAccount/[Controller]/[Action]")]
    public class TicketAccountController: YozeevControllerBase
    {
        private readonly ITicketDetailManager _ticketDetailManager;

        public TicketAccountController(ITicketDetailManager ticketDetailManager)
        {
            _ticketDetailManager = ticketDetailManager;
        }

        [HttpGet]
        public async Task<List<TicketDetailListDto>> TicketDetail(string activityId)
        {
            var td = _ticketDetailManager.GeTicketDetailByActivityId(activityId);
            var result = new List<TicketDetailListDto>(); 
            result = td.MapTo<List<TicketDetailListDto>>();

            return result;
        }
    }
}
